---
title: Print
icon: '#pro/Printer'
---

<MetaData
  lang="en-US"
  isPro
  meta={{
    preset: [{
      client: '@univerjs/preset-docs-advanced',
      locale: '@univerjs/preset-docs-advanced/locales/en-US',
      style: '@univerjs/preset-docs-advanced/lib/index.css',
    }],
    plugins: [{
      client: '@univerjs-pro/docs-print',
      locale: '@univerjs-pro/docs-print/locales/en-US',
    }],
    server: 'No',
  }}
/>

Print functionality allows users to print document content as physical documents or export it to PDF format for offline viewing and sharing.

## Preset Mode

The print functionality is included in the `@univerjs/preset-docs-advanced` preset.

### Installation

<Callout>
  The `UniverDocsAdvancedPreset` preset from `@univerjs/preset-docs-advanced` depends on the `UniverDocsDrawingPreset` preset at runtime. Please install `@univerjs/preset-docs-drawing` first.
</Callout>

```package-install
npm install @univerjs/preset-docs-drawing @univerjs/preset-docs-advanced
```

### Usage

```typescript
import { UniverDocsAdvancedPreset } from '@univerjs/preset-docs-advanced' // [!code ++]
import UniverPresetDocsAdvancedEnUS from '@univerjs/preset-docs-advanced/locales/en-US' // [!code ++]
import { UniverDocsCorePreset } from '@univerjs/preset-docs-core'
import UniverPresetDocsCoreEnUS from '@univerjs/preset-docs-core/locales/en-US'
import { UniverDocsDrawingPreset } from '@univerjs/preset-docs-drawing' // [!code ++]
import UniverPresetDocsDrawingEnUS from '@univerjs/preset-docs-drawing/locales/en-US' // [!code ++]
import { createUniver, LocaleType, mergeLocales } from '@univerjs/presets'

import '@univerjs/preset-docs-core/lib/index.css'
import '@univerjs/preset-docs-drawing/lib/index.css' // [!code ++]
import '@univerjs/preset-docs-advanced/lib/index.css' // [!code ++]

const { univerAPI } = createUniver({
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: mergeLocales(
      UniverPresetDocsCoreEnUS,
      UniverPresetDocsDrawingEnUS, // [!code ++]
      UniverPresetDocsAdvancedEnUS, // [!code ++]
    ),
  },
  presets: [
    UniverDocsCorePreset(),
    UniverDocsDrawingPreset(), // [!code ++]
    UniverDocsAdvancedPreset(), // [!code ++]
  ],
})
```

If you have a commercial license for Univer, please refer to [Using License in Client](/guides/pro/license#in-preset-mode) for configuration.

{/* ### Presets and Configuration */}

## Plugin Mode

### Installation

```package-install
npm install @univerjs-pro/docs-print
```

### Usage

```typescript
import { UniverDocsPrintPlugin } from '@univerjs-pro/docs-print' // [!code ++]
import DocsPrintPluginEnUS from '@univerjs-pro/docs-print/locale/en-US' // [!code ++]
import { LocaleType, mergeLocales, Univer } from '@univerjs/core'

import '@univerjs-pro/docs-print/lib/index.css' // [!code ++]

const univer = new Univer({
  locale: LocaleType.EN_US,
  locales: {
    [LocaleType.EN_US]: mergeLocales(
      DocsPrintPluginEnUS, // [!code ++]
    ),
  },
})

univer.registerPlugin(UniverDocsPrintPlugin) // [!code ++]
```

If you have a commercial license for Univer, please refer to [Using License in Client](/guides/pro/license#in-plugin-mode) for configuration.

{/* ### Plugins and Configuration */}
